﻿[
    {
        $project: { "p": "$$ROOT", "_id": 0 }
    },
    {
        $lookup: {
            localField: "p.position",
            from: "positions",
            foreignField: "_id",
            as: "pos"
        }
    },
    {
        $unwind: {
            path: "$pos",
            preserveNullAndEmptyArrays: false
        }
    },
    {
        $project: {
            "people_no": "$p.people_no",
            "people_name": "$p.people_name",
            "_id": "$pos._id",
            "position_name": "$pos.position_name",
            "position_direct_superior": "$pos.position_direct_superior"
        }
    }
]